/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Widgets;
import java.awt.* ;
import java.awt.event.* ;
import javax.swing.* ;


/**
 *
 * @author Mdbrown
 */
public class suspendB extends JButton{

     private Thread runningThread = null ;

    public suspendB(String desc, Thread t){
         this.setName(desc);
         this.runningThread = t ;
    }//end of suspendB constructor

    private void suspendNow(){
        if(this.runningThread != null ){
            runningThread.suspend() ;
        }//end of if() conditionally statement

    }//end of suspendNow()

    public void actionPerformed(ActionEvent e){

        suspendNow() ;

    }//end of actionPerformed(ActionEvent e) method

}// end of class suspendB
